<?php
/**
 * Created by PhpStorm.
 * User: 王松
 * Time: 2017/12/15 14:36
 */

namespace App\Project\Search\Translate;

class PastTranslate
{
    public function fw($value)
    {
        $value = json_decode($value, true);

        return '开始时间:' . $value['time'];
    }

    public function hyt($value)
    {
        return $this->fw($value);
    }

    public function ct($value)
    {
        return $this->fw($value);
    }

    public function ht($value)
    {
        return $this->fw($value);
    }

    public function hat($value)
    {
        return $this->fw($value);
    }

    public function flt($value)
    {
        return $this->fw($value);
    }

    public function hst($value)
    {
        $value = json_decode($value, true);

        $type = app('field')->get('past.hepatitis.type');

        return $type[$value['type']] . ' 开始时间:' . $value['duration'];
    }

    public function pa($value)
    {
        $value = json_decode($value, true);

        return '急性胰腺炎 开始时间:' . $value['acute'];
    }

    public function pc($value)
    {
        $value = json_decode($value, true);

        return '慢性胰腺炎 开始时间:' . $value['chronic'];
    }

    public function pot($value)
    {
        return $this->fw($value);
    }

    public function rt($value)
    {
        return $this->fw($value);
    }

    public function cit($value)
    {
        return $this->fw($value);
    }

    public function pcos($value)
    {
        return $this->fw($value);
    }
    public function trt($value)
    {
        return $this->fw($value);
    }
    public function cot($value)
    {
        return $this->fw($value);
    }

    public function tt($value)
    {
        $value = json_decode($value, true);
        return '输血次数:' . $value['times'];
    }

    public function iit($value)
    {
        $value = json_decode($value, true);
        return '过敏物:' . $value['items'];
    }

    public function tht($value)
    {
        $value = json_decode($value, true);

        $type = app('field')->get('past.thyroid.type');

        return $type[$value['type']] . ' 开始时间:' . $value['time'];
    }
}